package com.jt.provider.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Service;

@Service
public class ResourceService{
//    @SentinelResource("doGetResource")
//    public String doGetResource(){
//        return "doGetResource";
//    }
    @SentinelResource(value="doGetResource",
            blockHandlerClass = ResourceBlockHandler.class,
            blockHandler = "call")
    public String doGetResource(){
        return "do get resource";
    }

    @SentinelResource(value="selectById",
            blockHandlerClass = ResourceBlockHandler.class,
            blockHandler = "call")
    public String doGetResource(Integer id){
        return "do get resource";
    }


}
